package com.example;

import com.example.ext.HelloService;
import com.example.ext.MyImportBeanDefinitionRegistrar;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Import;

//@Import(HelloService.class)
//@Import(MyImportSelector.class)
@MapperScan(basePackages = {"com.example.mapper"})
@Import(MyImportBeanDefinitionRegistrar.class)
@SpringBootApplication
public class JavaStudySpringbootApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(JavaStudySpringbootApplication.class, args);
        HelloService bean = run.getBean(HelloService.class);
        System.out.println("bean = " + bean);
    }

}
